
package com.jf.cloud.combo.controller.multishop;

import com.jf.cloud.combo.service.ComboOrderService;
import io.swagger.v3.oas.annotations.tags.Tag;
import ma.glasnost.orika.MapperFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 套餐订单表
 *
 * @author zz
 * @date 2022-08-16 09:18:06
 */
@RestController("multishopComboOrderController")
@RequestMapping("/m/combo_order")
@Tag(name = "套餐订单表")
public class ComboOrderController {

    @Autowired
    private ComboOrderService comboOrderService;

    @Autowired
    private MapperFacade mapperFacade;

//    @GetMapping("/page")
//    @Operation(summary = "获取套餐订单表列表" , description = "分页获取套餐订单表列表")
//    public ServerResponseEntity<PageVO<ComboOrder>> page(@Valid PageDTO pageDTO) {
//        PageVO<ComboOrder> comboOrderPage = comboOrderService.page(pageDTO);
//        return ServerResponseEntity.success(comboOrderPage);
//    }
//
//    @GetMapping
//    @Operation(summary = "获取套餐订单表" , description = "根据comboOrderId获取套餐订单表")
//    public ServerResponseEntity<ComboOrder> getByComboOrderId(@RequestParam Long comboOrderId) {
//        return ServerResponseEntity.success(comboOrderService.getByComboOrderId(comboOrderId));
//    }
//
//    @PostMapping
//    @Operation(summary = "保存套餐订单表" , description = "保存套餐订单表")
//    public ServerResponseEntity<Void> save(@Valid @RequestBody ComboOrderDTO comboOrderDTO) {
//        ComboOrder comboOrder = mapperFacade.map(comboOrderDTO, ComboOrder.class);
//        comboOrder.setComboOrderId(null);
//        comboOrderService.save(comboOrder);
//        return ServerResponseEntity.success();
//    }
//
//    @PutMapping
//    @Operation(summary = "更新套餐订单表" , description = "更新套餐订单表")
//    public ServerResponseEntity<Void> update(@Valid @RequestBody ComboOrderDTO comboOrderDTO) {
//        ComboOrder comboOrder = mapperFacade.map(comboOrderDTO, ComboOrder.class);
//        comboOrderService.update(comboOrder);
//        return ServerResponseEntity.success();
//    }
//
//    @DeleteMapping
//    @Operation(summary = "删除套餐订单表" , description = "根据套餐订单表id删除套餐订单表")
//    public ServerResponseEntity<Void> delete(@RequestParam Long comboOrderId) {
//        comboOrderService.deleteById(comboOrderId);
//        return ServerResponseEntity.success();
//    }
}
